<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>具名插槽</title>
</head>
<body>
    <div id="app">
        <cpn></cpn>
        <cpn>
            <span slot="left">左边栏</span>
        </cpn>
    </div>

    <template id="cpn">
        <div>
            <slot name="left"><span>左边</span></slot>
            <slot name="center"><span>中间</span></slot>
            <slot name="right"><span>右边</span></slot>
        </div>
    </template>

    <script src="../js/vue.js"></script>
    <script>
        const cpn = {
            template: '#cpn',
        }

        const app = new Vue({
            el: '#app',
            data: {

            },
            methods: {

            },
            components: {
                cpn
            }
        })
    </script>
</body>
</html>